﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace TestGame
{
    class Tower : Sprite
    {
        public Tower(int x, int y, string s) : this(x, y, s, Game.GLOBAL_SIZE) { }

        public Tower(int x, int y, string s, float f)
            : base(x, y, s, f)
        {
            Layer = 5;
            CurrentState = State.Background;
        }

        public override void Clicked(SpriteBatch batch, GraphicsDevice graphics, Sprite clicked)
        {
            // draw a circle around the tower when it gets clicked
            Vector2 center = new Vector2(clicked.Position.X + clicked.Size.Width / 2, clicked.Position.Y + clicked.Size.Height / 2);
            BasicPrimitives b = new BasicPrimitives(graphics);
            b.CreateEllipse(100, 100, 64);
            b.Position = center;
            b.RenderRoundPrimitive(batch);
        }
    }
}
